
//connect DB
const mongoose = require('mongoose');

const databaseName = 'carRentalDateBase';
const url = 'localhost:27017';

const dbURL = `mongodb://${url}/${databaseName}`;

mongoose.connect(dbURL, {
  useNewUrlParser: true,
  useUnifiedTopology: true
});

//connect success
mongoose.connection.once('open', () => {
  console.log(dbURL + "connect success");
})
